cmake_minimum_required(VERSION 3.5)

project(bsw VERSION 0.0.1)

set(CMAKE_CXX_STANDARD 14)

# set(CMAKE_AUTOMOC ON)
# set(CMAKE_AUTORCC ON)
# set(CMAKE_AUTOUIC ON)
# # Qt tools path
# set(OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OECORE_NATIVE_SYSROOT}/usr/bin)

# Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
# Workaround: https://community.nxp.com/t5/i-MX-Processors/Missing-stdlib-h-with-cmake-project-and-yocto-sdk/td-p/874156
# set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON)

# find_package(Qt5 COMPONENTS Core SerialBus SerialPort Network REQUIRED)

set(SRC_LIST
        main.cpp
        test/test.cpp
        modbus/modbus-data.c
        modbus/modbus-rtu.c
        modbus/modbus-tcp.c
        modbus/modbus.c
         )

add_executable(bsw
    ${SRC_LIST}
)



target_include_directories(bsw
PRIVATE include(
    test
    modbus
)
)

# target_link_libraries(bsw
#     Qt5::Core
#     Qt5::SerialBus
#     Qt5::SerialPort
#     Qt5::Network
# )



